home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-11-02 | 24.0 KB | 491 lines | [TEXT/ALFA] |
- ## -*-Tcl-*-
- # ###################################################################
- # HTML mode - tools for editing HTML documents
- #
- # FILE: "htmlExtensions.tcl"
- # created: 97-01-25 23.43.38
- # last update: 97-10-29 19.32.33
- # Author: Johan Linde
- # E-mail: <jl@theophys.kth.se>
- # www: <http://bach.theophys.kth.se/~jl/Alpha.html>
- #
- # Version: 2.0.3
- #
- # Copyright 1996, 1997 by Johan Linde
- #
- # This software may be used freely, and distributed freely, as long as the
- # receiver is not obligated in any way by receiving it.
- #
- # If you make improvements to this file, please share them!
- #
- # ###################################################################
- ##
- proc htmlExtensions.tcl {} {}
-
- #
- # htmlElemAttrRequired: the per-element lists of all required attributes
- # htmlElemAttrOptional: the per-element lists of all optional attributes
- # htmlElemAttrChoices: element-specific attribute completions
- # htmlElemAttrNumber: the per-element list of attributes which are numbers.
- # htmlElemEventHandler: the per-element list of JavaScript's event handlers.
- # htmlElemAttrUsed: the per-element list of elements asked for in the status bar.
- # htmlElemHideNetscape: Netscape only attributes.
- # htmlElemHideIE: Internet Explorer only attributes.
- #
- # htmlElemAttrOptional has to be defined for every element for everything
- # to work.
-
- set htmlElemAttrOptional1(HTML) {}
- set htmlElemAttrOptional1(HEAD) {}
- set htmlElemAttrOptional1(TITLE) {}
- set htmlElemAttrOptional1(BODY) {BACKGROUND= BGPROPERTIES= BGCOLOR= TEXT= LINK= VLINK= ALINK=
- LEFTMARGIN= TOPMARGIN=}
- set htmlElemAttrChoices1(BODY) {BGPROPERTIES=FIXED}
- set htmlElemAttrNumber1(BODY) {LEFTMARGIN=0:i:n TOPMARGIN=0:i:n}
- set htmlElemEventHandler1(BODY) {onLoad= onUnload=}
- htmlSetAttrUsed "" BODY {BACKGROUND= BGCOLOR= TEXT= LINK= VLINK=}
- set htmlElemHideIE(BODY) {BGPROPERTIES= LEFTMARGIN= TOPMARGIN=}
-
- set htmlElemAttrOptional1(STYLE) {TYPE=}
- set htmlElemAttrOptional1(SPAN) {}
- htmlSetAttrUsed "" SPAN {CLASS= ID= STYLE=}
-
- set htmlElemAttrOptional1(H1) {ALIGN= }
- set htmlElemAttrChoices1(H1) {ALIGN=CENTER ALIGN=RIGHT ALIGN=LEFT}
- htmlSetAttrUsed "" H1 {ALIGN=}
- set htmlElemAttrOptional1(H2) {ALIGN= }
- set htmlElemAttrChoices1(H2) {ALIGN=CENTER ALIGN=RIGHT ALIGN=LEFT}
- htmlSetAttrUsed "" H2 {ALIGN=}
- set htmlElemAttrOptional1(H3) {ALIGN= }
- set htmlElemAttrChoices1(H3) {ALIGN=CENTER ALIGN=RIGHT ALIGN=LEFT}
- htmlSetAttrUsed "" H3 {ALIGN=}
- set htmlElemAttrOptional1(H4) {ALIGN= }
- set htmlElemAttrChoices1(H4) {ALIGN=CENTER ALIGN=RIGHT ALIGN=LEFT}
- htmlSetAttrUsed "" H4 {ALIGN=}
- set htmlElemAttrOptional1(H5) {ALIGN= }
- set htmlElemAttrChoices1(H5) {ALIGN=CENTER ALIGN=RIGHT ALIGN=LEFT}
- htmlSetAttrUsed "" H5 {ALIGN=}
- set htmlElemAttrOptional1(H6) {ALIGN= }
- set htmlElemAttrChoices1(H6) {ALIGN=CENTER ALIGN=RIGHT ALIGN=LEFT}
- htmlSetAttrUsed "" H6 {ALIGN=}
-
- set htmlElemAttrOptional1(P) {ALIGN= }
- set htmlElemAttrChoices1(P) {ALIGN=CENTER ALIGN=RIGHT ALIGN=LEFT}
- htmlSetAttrUsed "" P {ALIGN=}
- set htmlElemAttrOptional1(BLOCKQUOTE) {}
- set htmlElemAttrOptional1(DIV) {ALIGN= }
- set htmlElemAttrChoices1(DIV) {ALIGN=CENTER ALIGN=RIGHT ALIGN=LEFT}
- htmlSetAttrUsed "" DIV {ALIGN=}
- set htmlElemAttrOptional1(ADDRESS) {}
- set htmlElemAttrOptional1(CENTER) {}
- set htmlElemAttrOptional1(PRE) {WIDTH= }
- set htmlElemAttrNumber1(PRE) {WIDTH=1:i:n}
- set htmlElemAttrRequired1(MULTICOL) {COLS=}
- set htmlElemAttrOptional1(MULTICOL) {GUTTER= WIDTH=}
- set htmlElemAttrNumber1(MULTICOL) {COLS=2:i:n GUTTER=0:i:n WIDTH=1:i:%}
- htmlSetAttrUsed "" MULTICOL {COLS= GUTTER= WIDTH=}
- set htmlElemAttrRequired1(SPACER) {TYPE=}
- set htmlElemAttrOptional1(SPACER) {SIZE= WIDTH= HEIGHT= ALIGN=}
- set htmlElemAttrNumber1(SPACER) {SIZE=1:i:n WIDTH=1:i:% HEIGHT=1:i:%}
- set htmlElemAttrChoices1(SPACER) {TYPE=HORIZONTAL TYPE=VERTICAL TYPE=BLOCK ALIGN=TOP
- ALIGN=MIDDLE ALIGN=BOTTOM ALIGN=LEFT ALIGN=RIGHT ALIGN=TEXTTOP ALIGN=ABSMIDDLE ALIGN=BASELINE}
- htmlSetAttrUsed "" SPACER {TYPE= SIZE= WIDTH= HEIGHT= ALIGN=}
- set htmlElemAttrOptional1(BR) {CLEAR= }
- set htmlElemAttrChoices1(BR) {CLEAR=ALL CLEAR=LEFT CLEAR=RIGHT CLEAR=NONE}
- set htmlElemAttrOptional1(HR) {ALIGN= SIZE= WIDTH= COLOR= NOSHADE}
- set htmlElemAttrChoices1(HR) {ALIGN=LEFT ALIGN=RIGHT ALIGN=CENTER}
- set htmlElemAttrNumber1(HR) {SIZE=1:i:n WIDTH=1:i:%}
- set htmlElemHideIE(HR) {COLOR=}
- set htmlElemAttrOptional1(NOBR) {}
- set htmlElemAttrOptional1(WBR) {}
-
- set htmlElemAttrOptional1(FONT) {SIZE= COLOR= FACE= POINT-SIZE=}
- set htmlElemAttrNumber1(FONT) {SIZE=1:7:n POINT-SIZE=1:i:n}
- set htmlElemHideNetscape(FONT) {POINT-SIZE=}
- htmlSetAttrUsed "" FONT {SIZE=}
- set htmlElemAttrRequired1(BASEFONT) {}
- set htmlElemAttrOptional1(BASEFONT) {SIZE= COLOR= FACE=}
- set htmlElemAttrNumber1(BASEFONT) {SIZE=1:7:n}
- htmlSetAttrUsed "" BASEFONT {SIZE=}
- set htmlElemAttrOptional1(MARQUEE) {BEHAVIOR= DIRECTION= ALIGN= LOOP= WIDTH= HEIGHT=
- HSPACE= VSPACE= BGCOLOR= SCROLLAMOUNT= SCROLLDELAY=}
- set htmlElemAttrNumber1(MARQUEE) {LOOP=-1:i:n HEIGHT=1:i:% WIDTH=1:i:% HSPACE=0:i:n
- VSPACE=0:i:n SCROLLAMOUNT=1:i:n SCROLLDELAY=1:i:n}
- set htmlElemAttrChoices1(MARQUEE) {BEHAVIOR=SLIDE BEHAVIOR=ALTERNATE BEHAVIOR=SCROLL
- DIRECTION=RIGHT DIRECTION=LEFT ALIGN=TOP ALIGN=MIDDLE ALIGN=BOTTOM}
- htmlSetAttrUsed "" MARQUEE {BEHAVIOR= DIRECTION= LOOP=}
- set htmlElemAttrOptional1(B) {}
- set htmlElemAttrOptional1(I) {}
- set htmlElemAttrOptional1(STRIKE) {}
- set htmlElemAttrOptional1(U) {}
- set htmlElemAttrOptional1(SUB) {}
- set htmlElemAttrOptional1(SUP) {}
- set htmlElemAttrOptional1(BIG) {}
- set htmlElemAttrOptional1(SMALL) {}
- set htmlElemAttrOptional1(EM) {}
- set htmlElemAttrOptional1(STRONG) {}
- set htmlElemAttrOptional1(DFN) {}
- set htmlElemAttrOptional1(CODE) {}
- set htmlElemAttrOptional1(VAR) {}
- set htmlElemAttrOptional1(CITE) {}
- set htmlElemAttrOptional1(KBD) {}
- set htmlElemAttrOptional1(TT) {}
- set htmlElemAttrOptional1(SAMP) {}
- set htmlElemAttrOptional1(BLINK) {}
-
- set htmlElemAttrOptional1(A) {HREF= NAME= TARGET= REL= REV= TITLE= }
- set htmlElemEventHandler1(A) {onClick= onMouseOver= onMouseOut= onMouseDown= onMouseUp=}
- htmlSetAttrUsed "" A {HREF= NAME=}
- set htmlElemAttrRequired1(IMG) {SRC=}
- set htmlElemAttrOptional1(IMG) {LOWSRC= WIDTH= HEIGHT= BORDER=
- ALIGN= ALT= HSPACE= VSPACE= USEMAP= ISMAP DYNSRC= LOOP= START= CONTROLS}
- set htmlElemAttrChoices1(IMG) {ALIGN=TOP ALIGN=MIDDLE ALIGN=BOTTOM
- ALIGN=LEFT ALIGN=RIGHT ALIGN=TEXTTOP ALIGN=ABSMIDDLE ALIGN=BASELINE START=FILEOPEN
- START=MOUSEOVER}
- set htmlElemAttrNumber1(IMG) {BORDER=0:i:n WIDTH=1:i:% HEIGHT=1:i:%
- HSPACE=0:i:n VSPACE=0:i:n LOOP=-1:i:n}
- set htmlElemEventHandler1(IMG) {onAbort= onError= onLoad=}
- htmlSetAttrUsed "" IMG {SRC= WIDTH= HEIGHT= ALIGN= ALT=}
- set htmlElemHideNetscape(IMG) {LOWSRC=}
- set htmlElemHideIE(IMG) {CONTROLS DYNSRC= LOOP= START=}
- set htmlElemAttrOptional1(OBJECT) {CLASSID= CODEBASE= CODETYPE= DATA= NAME= TYPE= STANDBY=
- ALIGN= BORDER= WIDTH= HEIGHT= HSPACE= VSPACE= USEMAP= DECLARE SHAPES}
- set htmlElemAttrNumber1(OBJECT) {WIDTH=1:i:n HEIGHT=1:i:n HSPACE=0:i:n VSPACE=0:i:n BORDER=0:i:n}
- set htmlElemAttrChoices1(OBJECT) {ALIGN=TEXTTOP ALIGN=MIDDLE ALIGN=TEXTMIDDLE ALIGN=TEXTBOTTOM
- ALIGN=BASELINE ALIGN=LEFT ALIGN=CENTER ALIGN=RIGHT}
- htmlSetAttrUsed "" OBJECT {CLASSID= CODETYPE= DATA= TYPE= WIDTH= HEIGHT=}
- set htmlElemAttrRequired1(BGSOUND) {SRC=}
- set htmlElemAttrOptional1(BGSOUND) {LOOP=}
- set htmlElemAttrNumber1(BGSOUND) {LOOP=-1:i:n}
- htmlSetAttrUsed "" BGSOUND {SRC= LOOP=}
-
- set htmlElemAttrRequired1(EMBED) {SRC= WIDTH= HEIGHT=}
- set htmlElemAttrOptional1(EMBED) {HSPACE= VSPACE= ALIGN=}
- set htmlElemAttrNumber1(EMBED) {WIDTH=1:i:n HEIGHT=1:i:n HSPACE=1:i:n VSPACE=1:i:n}
- set htmlElemAttrChoices1(EMBED) {ALIGN=TOP ALIGN=MIDDLE ALIGN=BOTTOM
- ALIGN=LEFT ALIGN=RIGHT ALIGN=TEXTTOP ALIGN=ABSMIDDLE ALIGN=BASELINE}
- set htmlElemAttrOptional1(NOEMBED) {}
- set htmlElemAttrRequired1(LIVEAUDIO) {SRC= WIDTH= HEIGHT=}
- set htmlElemAttrOptional1(LIVEAUDIO) {HSPACE= VSPACE= ALIGN= AUTOSTART= LOOP=}
- set htmlElemAttrNumber1(LIVEAUDIO) {WIDTH=1:i:n HEIGHT=1:i:n HSPACE=1:i:n VSPACE=1:i:n}
- set htmlElemAttrChoices1(LIVEAUDIO) {ALIGN=TOP ALIGN=MIDDLE ALIGN=BOTTOM
- ALIGN=LEFT ALIGN=RIGHT ALIGN=TEXTTOP ALIGN=ABSMIDDLE ALIGN=BASELINE
- AUTOSTART=TRUE AUTOSTART=FALSE LOOP=TRUE LOOP=FALSE}
- htmlSetAttrUsed "" LIVEAUDIO {SRC= WIDTH= HEIGHT= AUTOSTART= LOOP=}
- set htmlElemAttrRequired1(LIVEVIDEO) {SRC= WIDTH= HEIGHT=}
- set htmlElemAttrOptional1(LIVEVIDEO) {HSPACE= VSPACE= ALIGN= AUTOSTART= LOOP= CONTROLS=}
- set htmlElemAttrNumber1(LIVEVIDEO) {WIDTH=1:i:n HEIGHT=1:i:n HSPACE=1:i:n VSPACE=1:i:n}
- set htmlElemAttrChoices1(LIVEVIDEO) {ALIGN=TOP ALIGN=MIDDLE ALIGN=BOTTOM
- ALIGN=LEFT ALIGN=RIGHT ALIGN=TEXTTOP ALIGN=ABSMIDDLE ALIGN=BASELINE
- AUTOSTART=TRUE AUTOSTART=FALSE LOOP=TRUE LOOP=FALSE CONTROLS=TRUE CONTROLS=FALSE}
- htmlSetAttrUsed "" LIVEVIDEO {SRC= WIDTH= HEIGHT= AUTOSTART= LOOP= CONTROLS=}
- set htmlElemAttrRequired1([list QUICKTIME MOVIE]) {SRC= }
- set htmlElemAttrOptional1([list QUICKTIME MOVIE]) {WIDTH= HEIGHT= HSPACE= VSPACE= ALIGN=
- HIDDEN= AUTOPLAY= CONTROLLER= LOOP= PLAYEVERYFRAME= HREF= TARGET= PLUGINSPAGE=}
- set htmlElemAttrNumber1([list QUICKTIME MOVIE]) {WIDTH=1:i:n HEIGHT=1:i:n HSPACE=1:i:n VSPACE=1:i:n}
- set htmlElemAttrChoices1([list QUICKTIME MOVIE]) {ALIGN=TOP ALIGN=MIDDLE ALIGN=BOTTOM
- ALIGN=LEFT ALIGN=RIGHT ALIGN=TEXTTOP ALIGN=ABSMIDDLE ALIGN=BASELINE HIDDEN=TRUE HIDDEN=FALSE
- AUTOPLAY=TRUE AUTOPLAY=FALSE CONTROLLER=TRUE CONTROLLER=FALSE LOOP=TRUE LOOP=FALSE
- LOOP=PALINDROME PLAYEVERYFRAME=TRUE PLAYEVERYFRAME=FALSE}
- htmlSetAttrUsed "" "QUICKTIME MOVIE" {SRC= WIDTH= HEIGHT= HIDDEN= AUTOPLAY= CONTROLLER= LOOP=
- PLAYEVERYFRAME=}
- set htmlElemAttrRequired1([list QUICKTIME VR]) {SRC= WIDTH= HEIGHT=}
- set htmlElemAttrOptional1([list QUICKTIME VR]) {HSPACE= VSPACE= ALIGN= PAN= TILT= FOV=
- NODE= CORRECTION= PLUGINSPAGE=}
- set htmlElemAttrNumber1([list QUICKTIME VR]) {WIDTH=1:i:n HEIGHT=1:i:n
- HSPACE=1:i:n VSPACE=1:i:n PAN=0:360:n TILT=-360:360:n FOV=-360:360:n NODE=0:i:n}
- set htmlElemAttrChoices1([list QUICKTIME VR]) {ALIGN=TOP ALIGN=MIDDLE ALIGN=BOTTOM
- ALIGN=LEFT ALIGN=RIGHT ALIGN=TEXTTOP ALIGN=ABSMIDDLE ALIGN=BASELINE
- CORRECTION=NONE CORRECTION=PARTIAL CORRECTION=FULL}
- htmlSetAttrUsed "" "QUICKTIME VR" {SRC= WIDTH= HEIGHT= PAN= TILT= FOV=
- NODE= CORRECTION=}
- set htmlElemAttrRequired1(REALAUDIO) {SRC= WIDTH= HEIGHT=}
- set htmlElemAttrOptional1(REALAUDIO) {HSPACE= VSPACE= ALIGN= CONTROLS= AUTOSTART=
- NOLABELS= CONSOLE=}
- set htmlElemAttrNumber1(REALAUDIO) {WIDTH=1:i:n HEIGHT=1:i:n HSPACE=1:i:n VSPACE=1:i:n}
- set htmlElemAttrChoices1(REALAUDIO) {ALIGN=TOP ALIGN=MIDDLE ALIGN=BOTTOM
- ALIGN=LEFT ALIGN=RIGHT ALIGN=TEXTTOP ALIGN=ABSMIDDLE ALIGN=BASELINE
- CONTROLS=ALL CONTROLS=CONTROLPANEL CONTROLS=INFOVOLUMEPANEL CONTROLS=INFOPANEL
- CONTROLS=STATUSBAR CONTROLS=PLAYBUTTON CONTROLS=STOPBUTTON CONTROLS=VOLUMESLIDER
- CONTROLS=POSITIONSLIDER CONTROLS=POSITIONFIELD CONTROLS=STATUSFIELD
- AUTOSTART=TRUE AUTOSTART=FALSE NOLABELS=TRUE NOLABELS=FALSE}
- htmlSetAttrUsed "" REALAUDIO {SRC= WIDTH= HEIGHT= CONTROLS= AUTOSTART=
- NOLABELS= CONSOLE=}
-
- set htmlElemAttrOptional1(UL) {TYPE= COMPACT}
- set htmlElemAttrChoices1(UL) {TYPE=DISC TYPE=CIRCLE TYPE=SQUARE}
- set htmlElemAttrOptional1([list LI IN UL]) {TYPE=}
- set htmlElemAttrChoices1([list LI IN UL]) {TYPE=DISC TYPE=CIRCLE TYPE=SQUARE}
- set htmlElemAttrOptional1(OL) {TYPE= START= COMPACT}
- set htmlElemAttrChoices1(OL) {TYPE=A TYPE=a TYPE=I TYPE=i TYPE=1}
- set htmlElemAttrNumber1(OL) {START=1:i:n}
- set htmlElemAttrOptional1([list LI IN OL]) {TYPE= VALUE=}
- set htmlElemAttrNumber1([list LI IN OL]) {VALUE=1:i:n}
- set htmlElemAttrChoices1([list LI IN OL]) {TYPE=A TYPE=a TYPE=I TYPE=i TYPE=1}
- set htmlElemAttrOptional1(DIR) {COMPACT}
- set htmlElemAttrOptional1(MENU) {COMPACT}
- set htmlElemAttrOptional1(LI) {}
- set htmlElemAttrOptional1(DL) {COMPACT}
- set htmlElemAttrOptional1(DT) {}
- set htmlElemAttrOptional1(DD) {}
-
- set htmlElemAttrOptional1(FORM) {ACTION= METHOD= ENCTYPE= TARGET= NAME=}
- set htmlElemAttrChoices1(FORM) {METHOD=POST METHOD=GET}
- set htmlElemEventHandler1(FORM) {onReset= onSubmit=}
- htmlSetAttrUsed "" FORM {ACTION= METHOD= }
- set htmlElemAttrRequired1(TEXT) {NAME=}
- set htmlElemAttrOptional1(TEXT) {VALUE= SIZE= MAXLENGTH=}
- set htmlElemAttrNumber1(TEXT) {SIZE=1:i:n MAXLENGTH=1:i:n}
- set htmlElemEventHandler1(TEXT) {onBlur= onChange= onFocus= onSelect= onKeyDown= onKeyPress= onKeyUp=}
- htmlSetAttrUsed "" TEXT {NAME= VALUE= SIZE= MAXLENGTH=}
- set htmlElemAttrRequired1(CHECKBOX) {NAME= VALUE=}
- set htmlElemAttrOptional1(CHECKBOX) {CHECKED}
- set htmlElemEventHandler1(CHECKBOX) {onClick=}
- htmlSetAttrUsed "" CHECKBOX {NAME= VALUE= CHECKED}
- set htmlElemAttrRequired1(BUTTON) {VALUE=}
- set htmlElemAttrOptional1(BUTTON) {NAME=}
- set htmlElemEventHandler1(BUTTON) {onClick= onMouseDown= onMouseUp=}
- htmlSetAttrUsed "" BUTTON {VALUE= NAME=}
- set htmlElemAttrRequired1(RADIO) {NAME= VALUE=}
- set htmlElemAttrOptional1(RADIO) {CHECKED}
- set htmlElemEventHandler1(RADIO) {onClick=}
- htmlSetAttrUsed "" RADIO {NAME= VALUE= CHECKED}
- set htmlElemAttrOptional1(SUBMIT) {NAME= VALUE=}
- set htmlElemEventHandler1(SUBMIT) {onClick=}
- htmlSetAttrUsed "" SUBMIT {VALUE= }
- set htmlElemAttrOptional1(RESET) {VALUE= }
- set htmlElemEventHandler1(RESET) {onClick=}
- htmlSetAttrUsed "" RESET {VALUE= }
- set htmlElemAttrRequired1(PASSWORD) {NAME= }
- set htmlElemAttrOptional1(PASSWORD) {VALUE= SIZE= MAXLENGTH=}
- set htmlElemAttrNumber1(PASSWORD) {SIZE=1:i:n MAXLENGTH=1:i:n}
- set htmlElemEventHandler1(PASSWORD) {onBlur= onChange= onFocus= onSelect= onKeyDown= onKeyPress= onKeyUp=}
- htmlSetAttrUsed "" PASSWORD {NAME= VALUE= SIZE= MAXLENGTH=}
- set htmlElemAttrRequired1(HIDDEN) {NAME= VALUE=}
- set htmlElemAttrOptional1(HIDDEN) {}
- set htmlElemAttrRequired1(IMAGE) {NAME= SRC=}
- set htmlElemAttrOptional1(IMAGE) {ALIGN=}
- set htmlElemAttrChoices1(IMAGE) {ALIGN=TOP ALIGN=MIDDLE ALIGN=BOTTOM
- ALIGN=LEFT ALIGN=RIGHT}
- set htmlElemAttrRequired1(FILE) {NAME= }
- set htmlElemAttrOptional1(FILE) {SIZE= MAXLENGTH=}
- set htmlElemAttrNumber1(FILE) {SIZE=1:i:n MAXLENGTH=1:i:n}
- set htmlElemAttrRequired1(SELECT) {NAME= }
- set htmlElemAttrOptional1(SELECT) {SIZE= MULTIPLE}
- set htmlElemAttrNumber1(SELECT) {SIZE=1:i:n}
- set htmlElemEventHandler1(SELECT) {onBlur= onChange= onFocus=}
- htmlSetAttrUsed "" SELECT {NAME= SIZE= MULTIPLE}
- set htmlElemAttrOptional1(OPTION) {VALUE= SELECTED}
- htmlSetAttrUsed "" OPTION {SELECTED}
- set htmlElemAttrRequired1(TEXTAREA) {NAME= ROWS= COLS=}
- set htmlElemAttrOptional1(TEXTAREA) {WRAP=}
- set htmlElemAttrNumber1(TEXTAREA) {ROWS=1:i:n COLS=1:i:n}
- set htmlElemAttrChoices1(TEXTAREA) {WRAP=VIRTUAL WRAP=PHYSICAL WRAP=OFF}
- set htmlElemEventHandler1(TEXTAREA) {onBlur= onChange= onFocus= onSelect= onKeyDown= onKeyPress= onKeyUp=}
- set htmlElemHideNetscape(TEXTAREA) {WRAP=}
- htmlSetAttrUsed "" TEXTAREA {NAME= ROWS= COLS=}
- set htmlElemAttrRequired1(KEYGEN) {NAME=}
- set htmlElemAttrOptional1(KEYGEN) {CHALLENGE=}
- htmlSetAttrUsed "" KEYGEN {NAME=}
-
- set htmlElemAttrOptional1(TABLE) {BORDER= CELLSPACING= CELLPADDING= COLS= WIDTH= HEIGHT=
- ALIGN= BGCOLOR= BORDERCOLOR= BORDERCOLORDARK= BORDERCOLORLIGHT= BACKGROUND= FRAME= RULES=}
- set htmlElemAttrChoices1(TABLE) {ALIGN=LEFT ALIGN=CENTER ALIGN=RIGHT FRAME=BORDER
- FRAME=VOID FRAME=ABOVE FRAME=BELOW FRAME=HSIDES FRAME=VSIDES FRAME=LHS FRAME=RHS FRAME=BOX
- RULES=GROUPS RULES=ROWS RULES=COLS RULES=ALL RULES=NONE}
- set htmlElemAttrNumber1(TABLE) {BORDER=0:i:n CELLSPACING=0:i:n COLS=1:i:n
- CELLPADDING=0:i:n WIDTH=1:i:% HEIGHT=1:i:%}
- htmlSetAttrUsed "" TABLE {BORDER= CELLSPACING= CELLPADDING=}
- set htmlElemHideIE(TABLE) {BORDERCOLORDARK= BORDERCOLORLIGHT=}
- set htmlElemAttrOptional1(TD) {ALIGN= VALIGN= COLSPAN= ROWSPAN= WIDTH= HEIGHT= NOWRAP
- BGCOLOR= BORDERCOLOR= BORDERCOLORDARK= BORDERCOLORLIGHT= BACKGROUND=}
- set htmlElemAttrChoices1(TD) {ALIGN=CENTER ALIGN=RIGHT ALIGN=LEFT
- VALIGN=BASELINE VALIGN=BOTTOM VALIGN=MIDDLE VALIGN=TOP }
- set htmlElemAttrNumber1(TD) {COLSPAN=1:i:n ROWSPAN=1:i:n WIDTH=1:i:% HEIGHT=1:i:n}
- htmlSetAttrUsed "" TD {ALIGN= VALIGN= COLSPAN= ROWSPAN= NOWRAP}
- set htmlElemHideIE(TD) {BORDERCOLOR= BORDERCOLORDARK= BORDERCOLORLIGHT=}
- set htmlElemAttrOptional1(TH) {ALIGN= VALIGN= COLSPAN= ROWSPAN= WIDTH= HEIGHT= NOWRAP
- BGCOLOR= BORDERCOLOR= BORDERCOLORDARK= BORDERCOLORLIGHT= BACKGROUND=}
- set htmlElemAttrChoices1(TH) {ALIGN=LEFT ALIGN=CENTER ALIGN=RIGHT
- VALIGN=BASELINE VALIGN=BOTTOM VALIGN=MIDDLE VALIGN=TOP }
- set htmlElemAttrNumber1(TH) {COLSPAN=1:i:n ROWSPAN=1:i:n WIDTH=1:i:% HEIGHT=1:i:n}
- htmlSetAttrUsed "" TH {ALIGN= VALIGN= COLSPAN= ROWSPAN= NOWRAP }
- set htmlElemHideIE(TH) {BORDERCOLOR= BORDERCOLORDARK= BORDERCOLORLIGHT=}
- set htmlElemAttrOptional1(TR) {ALIGN= VALIGN= BGCOLOR= BORDERCOLOR= BORDERCOLORDARK=
- BORDERCOLORLIGHT= BACKGROUND=}
- set htmlElemAttrChoices1(TR) {ALIGN=CENTER ALIGN=RIGHT ALIGN=LEFT
- VALIGN=BASELINE VALIGN=BOTTOM VALIGN=MIDDLE VALIGN=TOP }
- htmlSetAttrUsed "" TR {ALIGN= VALIGN=}
- set htmlElemHideIE(TR) {BORDERCOLOR= BORDERCOLORDARK= BORDERCOLORLIGHT=}
- set htmlElemHideNetscape(TR) {BACKGROUND=}
- set htmlElemAttrOptional1(CAPTION) {ALIGN=}
- set htmlElemAttrChoices1(CAPTION) {ALIGN=BOTTOM ALIGN=TOP }
- htmlSetAttrUsed "" CAPTION {ALIGN=}
- set htmlElemAttrOptional1(COL) {SPAN= ALIGN=}
- set htmlElemAttrNumber1(COL) {SPAN=1:i:n}
- set htmlElemAttrChoices1(COL) {ALIGN=CENTER ALIGN=RIGHT ALIGN=LEFT}
- htmlSetAttrUsed "" COL {SPAN= ALIGN=}
- set htmlElemAttrOptional1(COLGROUP) {SPAN= ALIGN=}
- set htmlElemAttrNumber1(COLGROUP) {SPAN=1:i:n}
- set htmlElemAttrChoices1(COLGROUP) {ALIGN=CENTER ALIGN=RIGHT ALIGN=LEFT}
- htmlSetAttrUsed "" COLGROUP {SPAN= ALIGN=}
- set htmlElemAttrOptional1(THEAD) {}
- set htmlElemAttrOptional1(TBODY) {}
- set htmlElemAttrOptional1(TFOOT) {}
-
- set htmlElemAttrOptional1(FRAMESET) {ROWS= COLS= FRAMEBORDER= BORDER= BORDERCOLOR= FRAMESPACING=}
- set htmlElemAttrNumber1(FRAMESET) {BORDER=0:i:n FRAMESPACING=0:i:n}
- set htmlElemAttrChoices1(FRAMESET) {FRAMEBORDER=YES FRAMEBORDER=NO}
- set htmlElemEventHandler1(FRAMESET) {onLoad= onUnload=}
- htmlSetAttrUsed "" FRAMESET {ROWS= COLS=}
- set htmlElemHideNetscape(FRAMESET) {BORDER= BORDERCOLOR=}
- set htmlElemHideIE(FRAMESET) {FRAMESPACING=}
- set htmlElemAttrRequired1(FRAME) {SRC=}
- set htmlElemAttrOptional1(FRAME) {NAME= MARGINWIDTH= MARGINHEIGHT= SCROLLING=
- NORESIZE FRAMEBORDER= BORDERCOLOR=}
- set htmlElemAttrChoices1(FRAME) {SCROLLING=YES SCROLLING=NO SCROLLING=AUTO
- FRAMEBORDER=YES FRAMEBORDER=NO}
- set htmlElemAttrNumber1(FRAME) {MARGINWIDTH=1:i:n MARGINHEIGHT=1:i:n}
- htmlSetAttrUsed "" FRAME {SRC= NAME= }
- set htmlElemHideNetscape(FRAME) {BORDERCOLOR=}
- set htmlElemAttrOptional1(NOFRAMES) {}
- set htmlElemAttrRequired1(IFRAME) {SRC= WIDTH= HEIGHT=}
- set htmlElemAttrOptional1(IFRAME) {NAME= MARGINWIDTH= MARGINHEIGHT= SCROLLING= ALIGN=}
- set htmlElemAttrNumber1(IFRAME) {WIDTH=1:i:n HEIGHT=1:i:n MARGINWIDTH=1:i:n MARGINHEIGHT=1:i:n}
- set htmlElemAttrChoices1(IFRAME) {SCROLLING=YES SCROLLING=NO SCROLLING=AUTO ALIGN=TOP
- ALIGN=MIDDLE ALIGN=BOTTOM ALIGN=LEFT ALIGN=RIGHT}
- htmlSetAttrUsed "" IFRAME {SRC= WIDTH= HEIGHT= NAME= ALIGN=}
-
- set htmlElemAttrRequired1(MAP) {NAME=}
- set htmlElemAttrOptional1(MAP) {}
- set htmlElemAttrRequired1(AREA) {ALT=}
- set htmlElemAttrOptional1(AREA) {SHAPE= COORDS= TARGET= HREF= NOHREF}
- set htmlElemAttrChoices1(AREA) {SHAPE=RECT SHAPE=CIRCLE SHAPE=POLY
- SHAPE=DEFAULT}
- set htmlElemEventHandler1(AREA) {onClick= onMouseOver= onMouseOut=}
- htmlSetAttrUsed "" AREA {SHAPE= COORDS= HREF= NOHREF}
-
- set htmlElemAttrRequired1(APPLET) {CODE= WIDTH= HEIGHT=}
- set htmlElemAttrOptional1(APPLET) {CODEBASE= ARCHIVE= HSPACE= VSPACE= ALIGN= NAME= ALT=
- MAYSCRIPT}
- set htmlElemAttrChoices1(APPLET) {ALIGN=TOP ALIGN=MIDDLE ALIGN=BOTTOM
- ALIGN=LEFT ALIGN=RIGHT ALIGN=TEXTTOP ALIGN=ABSMIDDLE
- ALIGN=BASELINE}
- set htmlElemAttrNumber1(APPLET) {VSPACE=0:i:n HSPACE=0:i:n WIDTH=1:i:n
- HEIGHT=1:i:n}
- htmlSetAttrUsed "" APPLET {CODE= WIDTH= HEIGHT= CODEBASE= ALIGN= }
- set htmlElemHideNetscape(APPLET) {MAYSCRIPT}
- set htmlElemAttrRequired1(PARAM) {NAME= VALUE=}
- set htmlElemAttrOptional1(PARAM) {TYPE= VALUETYPE=}
- set htmlElemAttrChoices1(PARAM) {VALUETYPE=REF VALUETYPE=OBJECT VALUETYPE=DATA}
- set htmlElemAttrOptional1(SCRIPT) {LANGUAGE= ARCHIVE= SRC=}
- htmlSetAttrUsed "" SCRIPT {LANGUAGE=}
- set htmlElemHideNetscape(SCRIPT) {ARCHIVE=}
- set htmlElemAttrOptional1(NOSCRIPT) {}
-
- set htmlElemAttrOptional1(LAYER) {LEFT= TOP= PAGEX= PAGEY= SRC= WIDTH= HEIGHT= CLIP= Z-INDEX=
- ABOVE= BELOW= VISIBILITY= BGCOLOR= BACKGROUND=}
- set htmlElemAttrChoices1(LAYER) {VISIBILITY=SHOW VISIBILITY=HIDDEN VISIBILITY=INHERIT}
- set htmlElemAttrNumber1(LAYER) {LEFT=-i:i:n TOP=-i:i:n PAGEX=0:i:n PAGEY=0:i:n WIDTH=1:i:%
- HEIGHT=1:i:% Z-INDEX=1:i:n}
- htmlSetAttrUsed "" LAYER {LEFT= TOP= SRC= WIDTH= HEIGHT= VISIBILITY=}
- set htmlElemEventHandler1(LAYER) {onMouseOver= onMouseOut= onLoad=}
- set htmlElemAttrOptional1(ILAYER) {LEFT= TOP= PAGEX= PAGEY= SRC= WIDTH= HEIGHT= CLIP= Z-INDEX=
- ABOVE= BELOW= VISIBILITY= BGCOLOR= BACKGROUND=}
- set htmlElemAttrChoices1(ILAYER) {VISIBILITY=SHOW VISIBILITY=HIDDEN VISIBILITY=INHERIT}
- set htmlElemAttrNumber1(ILAYER) {LEFT=-i:i:n TOP=-i:i:n PAGEX=0:i:n PAGEY=0:i:n WIDTH=1:i:%
- HEIGHT=1:i:% Z-INDEX=1:i:n}
- htmlSetAttrUsed "" ILAYER {LEFT= TOP= SRC= WIDTH= HEIGHT= VISIBILITY=}
- set htmlElemEventHandler1(ILAYER) {onMouseOver= onMouseOut= onLoad=}
- set htmlElemAttrOptional1(NOLAYER) {}
-
- set htmlElemAttrOptional1(BASE) {HREF= TARGET=}
- htmlSetAttrUsed "" BASE {HREF= }
- set htmlElemAttrOptional1(ISINDEX) {ACTION= PROMPT=}
- set htmlElemAttrOptional1(LINK) {HREF= REL= REV= TITLE= TYPE=}
- htmlSetAttrUsed "" LINK {HREF=}
- set htmlElemAttrRequired1(META) {CONTENT=}
- set htmlElemAttrOptional1(META) {NAME= HTTP-EQUIV=}
-
- # Add style sheet attrs, CLASS, ID, STYLE.
- set tmpNoStyle {BASE BASEFONT FRAME FRAMESET HEAD HTML IFRAME
- META PARAM SCRIPT STYLE TITLE WBR BGSOUND KEYGEN}
- foreach tmp [array names htmlElemAttrOptional1] {
- if {[lsearch -exact $tmpNoStyle $tmp] < 0} {
- lappend htmlElemAttrOptional1($tmp) CLASS= ID= STYLE=
- }
- }
-
- unset tmp tmpNoStyle
-
- proc htmlCheckConfig1 {} {
-
- upvar mayContain mayContain empty empty closingOptional closingOptional form form
-
- set headmisc {SCRIPT STYLE META LINK}
- set headContent {TITLE ISINDEX BASE BGSOUND}
- set heading {H1 H2 H3 H4 H5 H6}
- set lists {UL OL DIR MENU}
- set preformatted {PRE}
- set font {TT I B U STRIKE BIG SMALL SUB SUP BLINK}
- set phrase {EM STRONG DFN CODE SAMP KBD VAR CITE}
- set special {A IMG APPLET OBJECT FONT BASEFONT BR SCRIPT MAP SPAN IFRAME SPACER ILAYER MARQUEE EMBED NOBR}
- set form {INPUT SELECT TEXTAREA KEYGEN}
- set text [concat text $font $phrase $special $form]
- set block [concat P $lists $preformatted DL DIV CENTER NOSCRIPT NOFRAMES NOEMBED NOLAYER MULTICOL LAYER BLOCKQUOTE FORM ISINDEX HR TABLE]
- set flow [concat $text $block]
- set bodyContent [concat $heading $text $block ADDRESS]
-
- # Empty elements
- set empty {BASEFONT BR AREA LINK IMG PARAM HR INPUT ISINDEX BASE META COL FRAME SPACER WBR EMBED BGSOUND KEYGEN}
-
- # Define what each element mayContain contain
- foreach i [concat $font $phrase FONT A P $heading PRE DT CAPTION SPAN] {
- set mayContain($i) $text
- }
- set mayContain(A) [lreplace $mayContain(A) [set where [lsearch -exact $mayContain(A) A]] $where]
-
- set preExclusion {IMG BIG SMALL SUB SUP FONT}
- foreach i $preExclusion {
- set where [lsearch -exact $mayContain(PRE) $i]
- set mayContain(PRE) [lreplace $mayContain(PRE) $where $where]
- }
-
- foreach i {BODY DIV CENTER BLOCKQUOTE FORM TH TD IFRAME NOSCRIPT NOEMBED NOLAYER LAYER ILAYER MULTICOL MARQUEE} {
- set mayContain($i) $bodyContent
- }
- set mayContain(FORM) [lreplace $mayContain(FORM) [set where [lsearch -exact $mayContain(FORM) FORM]] $where]
- set mayContain(NOFRAMES) [concat BODY $bodyContent]
- set mayContain(ADDRESS) [concat $text P]
- set mayContain(MAP) AREA
- set mayContain(APPLET) [concat $text PARAM]
- set mayContain(OBJECT) [concat $bodyContent PARAM]
- set mayContain(DL) {DT DD}
- set mayContain(DD) $flow
- set mayContain(LI) $flow
- foreach i $lists {
- set mayContain($i) LI
- }
- set mayContain(NOBR) [concat $text WBR]
- set mayContain(SELECT) OPTION
- set mayContain(OPTION) text
- set mayContain(TEXTAREA) text
- set mayContain(TABLE) {CAPTION COL COLGROUP THEAD TBODY TFOOT}
- set mayContain(COLGROUP) COL
- set mayContain(TBODY) TR
- set mayContain(THEAD) TR
- set mayContain(TFOOT) TR
- set mayContain(TR) {TD TH}
- set mayContain(FRAMESET) {FRAMESET FRAME}
- set mayContain(HEAD) [concat $headContent $headmisc]
- set mayContain(SCRIPT) text
- set mayContain(STYLE) text
- set mayContain(TITLE) text
- set mayContain(HTML) {HEAD FRAMESET BODY}
- # Dummy tag to start with.
- set mayContain(WINDOW) HTML
-
- # These have an optional closing tag.
- set closingOptional {P DT DD LI OPTION TR TD TH HEAD BODY HTML COLGROUP THEAD TBODY TFOOT WINDOW}
- }
-